<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      div {
        font-size: 3rem;
        border: solid;
        padding: 20px;
      }
    </style>
  </head>
  <body>
    <div id="p1">
      p1
      <div id="p2">
        p2
        <div id="p3">p3</div>
      </div>
    </div>
    <script>
      const p1 = document.getElementById("p1");
      const p2 = document.getElementById("p2");
      const p3 = document.getElementById("p3");

      p1.onmouseenter = function (e) {
        console.log("p1 onmouseover");
      };

      p2.onmouseenter = function (e) {
        console.log("p2 onmouseover");
      };

      p3.onmouseenter = function (e) {
        console.log("p3 onmouseover");
      };
    </script>
  </body>
</html>
